package cn.iocoder.yudao.module.erp.controller.admin.taobaourl;


import com.google.gson.JsonObject;
import io.swagger.v3.core.util.Json;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;



@Tag(name = "淘宝码上放心API")
@RestController
@RequestMapping("/taobao/taobaourl")
@Validated
public class TaoBaoUrlController {
    @Resource
    private RestTemplate restTemplate;

    @PostMapping("/selectDrugListUrl")
    public Object selectDrugListUrl() {

        String url="http://127.0.0.1:8080/api/selectDrugListUrl"; // 请求头
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_JSON);
        // 请求体

        MultiValueMap<String, String> requestBody = new LinkedMultiValueMap<>();
        requestBody.add("param", null);


        // 发送请求

        HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(requestBody, headers);
        ResponseEntity<String> responseEntity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, String.class);

        return restTemplate.postForObject(url,responseEntity, String.class);
    }











}
